<!DOCTYPE html>
<html lang="en" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>computed</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>

</head>
<body>
<div id="app">
    <counter></counter>
</div>
<script type="text/javascript">

    const counter={
        template:"<h2>hello component{{num}}</h2>",
        data(){
            return {
                num:1
            }
        }

    }

    // Vue.component("counter",counter);


    var app = new Vue({
        el: "#app",
        data: {
        },
        components:{
            counter:counter
        }
    })
</script>
</body>
</html>